#pragma once
#include "fxcc/core/graph/opengl3/Effect3d.h"

namespace fxcc
{
    namespace graph
    {
        namespace opengl3
        {
            namespace ssao
            {
                struct FXCC_API  LightingEffect : public fxcc::graph::opengl3::Effect3d
                {
                    struct FXCC_API  Light
                    {
                        glm::vec3 Position;
                        float Linear;
                        glm::vec3 Color;
                        float Quadratic;
                    };

                    std::shared_ptr<fxcc::graph::opengl3::UniformBuffer> m_LightBuffer;
                    
                    LightingEffect();
                    void Begin();
                    void SetViewFragPosMap(const fxcc::graph::opengl3::Texture2DJack *texture);
                    void SetViewNormalMap(const fxcc::graph::opengl3::Texture2DJack *texture);
                    void SetAlbedoMap(const fxcc::graph::opengl3::Texture2DJack *texture);
                    void SetSSAOMap(const fxcc::graph::opengl3::Texture2DJack *texture);
                    

                    void SetLight(const Light &light);
                    std::string FragCode();
                };
            };
        };
    };
};